package com.showsu.editor.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author edison
 */

@Getter
@AllArgsConstructor
public enum ResultCode {

    SUCCESS(200, "操作成功"),

    FAILURE(40000, "业务异常"),
    UN_AUTHORIZED(40001, "请求未授权"),
    CLIENT_UN_AUTHORIZED(40002, "客户端请求未授权"),
    NOT_FOUND(40003, "404 没找到请求"),
    MSG_NOT_READABLE(40004, "消息不能读取"),
    METHOD_NOT_SUPPORTED(40005, "不支持当前请求方法"),
    MEDIA_TYPE_NOT_SUPPORTED(40006, "不支持当前媒体类型"),
    REQ_REJECT(40007, "请求被拒绝"),
    INTERNAL_SERVER_ERROR(50008, "服务器异常"),
    PARAM_MISS(40009, "缺少必要的请求参数"),
    PARAM_TYPE_ERROR(40010, "请求参数类型错误"),
    PARAM_BIND_ERROR(40011, "请求参数绑定错误"),
    PARAM_VALID_ERROR(40012, "参数校验失败"),
    UN_LOGINED(40013, "请重新登录"),
    MULTI_LOGGED(40014, "账号已被多台设备登录"),
    ALREADY_LOGOUT(40015, "会话已失效"),
    LOGIN_FAIL(40016, "登录失败"),
    REGISTER_FAIL(40017, "注册失败"),
    PARAM_VALID_NON_COMPLIANT(40018, "含有严重违规内容，请更换内容"),
    KEYWORD_VALID_NON_COMPLIANT(40019, "含有严重违规关键词，请更换内容"),
    ONLY_COMPLETE_TASK_CAN_BE_DELETED(40020, "仅可删除已完成的任务"),
    NEED_KEYWORD(40021, "请添加查询关键词"),

    // 验证
    USER_FROZEN(50001, "用户冻结"),
    BLACK_USED(50002, "非法用户"),
    CODE_INVALID(50003, "无效的验证码"),
    CODE_EXPIRED(50004, "验证码已过期"),
    CODE_REPEAT(50005, "请勿重复发送"),
    PASSWORD_INVALID(50006, "无效的密码"),
    USER_EXISTED(50007, "用户已存在，请勿重复注册"),
    USER_NOT_EXIST(50008, "用户不存在"),
    PASSWORD_INCORRECT(50009, "密码错误"),
    VERIFICATION_FAILED(50010, "验证失败"),

    //业务相关
    RESOURCE_NOT_VALID(60001, "无效内容"),
    FREE_LIMITED(60002, "次数已用完，请升级会员"),
    VIP_EXPIRED(61005, "会员已到期"),
    COUNT_LIMITED(61006, "当日次数已用完"),
    NOT_XHS_LIVE(60003, "未检测到LIVE图"),
    NOT_XHS_ANIM(61021, "未检测到动图，请更换链接"),
    TRY_AGAIN(60004, "任务量大，请稍后重试"),
    PIC_CHECK_FAIL(61012, "图片检测失败"),
    PIC_SIZE_LIMIT(61013, "图片大于限制大小"),
    PIC_UPLOAD_FAIL(61014, "图片上传失败"),
    PIC_TYPE_ERROR(61025, "图片类型错误"),
    PIC_COUNT_LIMIT(61027, "图片数量大于限制大小"),
    RESOURCE_NOT_FOUND(61102, "没有查询到结果"),
    XHS_AWEME_DELETE(61022, "作品无法正常展示"),
    XH_LINK_INVALID(60023, "未获取到数据，请确认小红书笔记连接是否正确或稍后重试"),

    //支付相关
    INITIATE_PAYMENT_FAIL(70001, "下单失败，请联系客服"),

    ;

    /**
     * 错误码
     */
    final int code;

    /**
     * 描述
     */
    final String message;
}
